
from typing import List



def removeElement( nums: List[int], val: int) -> int:

    #快慢指针
    fast = 0
    slow = 0
    size = len(nums)
    while fast < size:
        if nums[fast] != val:
            nums[slow] = nums[fast]
            slow += 1
        fast += 1
    return slow

print(removeElement([3,2,2,3],3))